import { createApp } from 'vue';
import App from './App.vue';
import router from './router';
import Antd from "ant-design-vue";
import "ant-design-vue/dist/antd.less";
import "@/common/css/reset.css";
import { createPinia } from "pinia";
// pinia持久化缓存插件
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";
import SvgIcon from '@/components/SvgIcon/SvgIcon.vue';
import "./permission";
import Directive from "./directive";

const app = createApp(App);

const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);

app.component("svg-icon", SvgIcon);

const requireContext = require.context('./assets/icons', false, /\.svg$/);
requireContext.keys().forEach(requireContext);

app.use(pinia);
app.use(Antd);
app.use(Directive);
app.use(router);
app.mount('#app');
